<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/5/26
  Time: 9:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>注册</title>
    <link rel="stylesheet" href="/bootstrap-3.3.7-dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="/bootstrap-3.3.7-dist/css/datetimepicker.min.css" media="screen">
</head>
<body>
<div class="container">
    <h1>欢迎注册</h1>
    <hr/>
    <form:form action="/users/register/registerP" method="post" commandName="user" role="form">
        <div class="form-group">
            <label for="phone">手机号</label>
            <input type="text" class="form-control" id="phone" name="phone" placeholder="请输入手机号"/>
        </div>
        <div class="form-group">
            <label for="pwd">密码</label>
            <input type="text" class="form-control" id="pwd" name="pwd" placeholder="请输入密码"/>
        </div>
        <div class="form-group">
            <label for="name">名字</label>
            <input type="text" class="form-control" id="name" name="name" placeholder="请输入您的名字"/>
        </div>
        <div class="form-group">
            <label for="nickname">昵称</label>
            <input type="text" class="form-control" id="nickname" name="nickname" placeholder="请输入您的昵称"/>
        </div>
        <div class="form-group">
            <label for="sex">性别</label>
            <select class="form-control" id="sex" name="sex">
                <option value="1">男</option>
                <option value="0">女</option>
            </select>
        </div>

        <div class="form-group">
            <label for="dateOfBirth">出生日期</label>
            <div class="input-group date form_datetime" data-date="2000-01-01" data-date-format="yyyy-mm-dd"
                 data-link-field="dateOfBirth">
                <input type="text" class="form-control" id="dateOfBirth" name="dateOfBirth" value="2000-01-01"
                       readonly>
                <!--<span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>-->
                <span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
            </div>
        </div>
        <div class="form-group">
            <label for="address">地址</label>
            <input type="text" class="form-control" id="address" name="address" placeholder="请输入地址"/>
        </div>
        <div class="form-group">
            <button type="submit" class="btn btn-success">提交</button>
        </div>
    </form:form>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="/bootstrap-3.3.7-dist/jquery-3.2.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<script src="/bootstrap-3.3.7-dist/js/datetimepicker.js"></script>
<script src="/bootstrap-3.3.7-dist/js/locales/datetimepicker.zh-CN.js"></script>
<script type="text/javascript">
    $(function () {
        $('.form_datetime').datetimepicker({ //日期选择框
            language: 'zh-CN',//显示中文
            format: 'yyyy-mm-dd',//显示格式
            minView: "month",//设置只显示到月份
            autoclose: true,//选中自动关闭
            todayBtn: true//显示今日按钮
        });
    })
</script>
</body>
</html>
